﻿<%@ Page Title="" Language="C#" MasterPageFile="~/ShopNestedMasterPage.master" AutoEventWireup="true" CodeBehind="WebShopInfo.aspx.cs" Inherits="Web.WebShopInfo" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
      <p style="padding:10px 0px 10px 0px;">
         <asp:SiteMapPath ID="SiteMapPath1" runat="server" CssClass="sitmap"
        Style="font-family: 幼圆; font-size: medium" Font-Names="Verdana" Font-Size="0.8em"  PathSeparator=" > ">
        <PathSeparatorStyle Font-Bold="True" ForeColor="#990000" />
        <CurrentNodeStyle ForeColor="#333333" />
        <NodeStyle Font-Bold="True" />
        <RootNodeStyle Font-Bold="True"  />
    </asp:SiteMapPath>
          <link href="css/bootstrap.min.css" rel="stylesheet" />
          <style>
              .pimg{
                  height:250px;
                  width:250px;
              }
              .prices{
                  height:20px;
                  height:60px;
                  background-color:#f8f8f8;
           
              }
              .pf{
                  font-weight:400;
                  line-height:60px;
                  height:60px;
                  font-size:30px;
                  color:#ff0000;
              }
          </style>
         <table class="col-md-12">
             <tr>
                 <td rowspan="4" style="width:300px;">
                     <img src="<%=model.imgpath %>" class="img-rounded pimg" />
                 </td>
             </tr>
             <tr>
                 <td style="height:20px; line-height:20px;" colspan="2">
                     <p style="height:20px; line-height:20px; font-size:20px; font-weight:600;" ><%=model.name %></p>
                 </td>
             </tr>
              <tr>
                 <td  style="height:30px; line-height:30px; background-color:#f8f8f8;">
                     <p class="pf" >￥<%=model.prices.ToString("f2") %></p>
                 </td>
                   <td  style="height:30px; line-height:30px; background-color:#f8f8f8;">
                     <p  >销量：<%=sellNums %> | 累计评价：<%=callNums %></p>
                 </td>
                
             </tr>
             
               <tr>
                 <td  colspan="2">
                     <div class="col-lg-4">
                             <button class="btn btn-block btn-danger " onclick="addCart()">加入购物车</button>
                     </div>
              
                 </td>
             </tr>
               <tr>
                 <td>
                     <p></p>
                 </td>
             </tr>
         </table>
          <div style="clear:both"></div>
          <ul class="breadcrumb">
              <li><a href="#">评价列表</a></li>

          </ul>
          <div style="clear:both"></div>
          <ul class="list-group">

              <%foreach (var item in call_list)%>
                <% {%>
              <li class="list-group-item"><span class="badge"><%=item.dates %></span><%=item.contents %>
                  <%if (item.callMsg.Trim().Length>0)%>
                    <% {%>
                         <div class="well">
            回复：<br />
            <span><%=item.callMsg %></span>
        </div>
                   <%  } %>
       
              </li>
                <% } %>

            <%--  <li class="list-group-item"><span class="badge">03/24</span>商品非常好
        <div class="well">
            回复：<br />
            <span>谢谢</span>
        </div>
              </li>
             --%>
          </ul>
          <script>
              function addCart() {
                 
                  $.ajax({
                      type: 'post',
                      url: '../Hanlder/GoodsHandler.ashx?Method=AddCart',
                      data: { Id: "<%=model.Id%>" },
                      success: function (data) {

                          var res = $.parseJSON(data);

                          if (res.states == 1) {
                              alert(res.msg);
                          } else {
                              alert('操作成功');
                              location.reload();;
                          }

                      }
                  });
              }
              
          </script>
</asp:Content>
